/**
 * 登录、注册相关API
 */

const http = uni.$u.http;

const loginApi = {
	
	// 手机号+密码登录
	mobileLogin: data => http.post('/member/auth/login', data), 
	
	// 手机号+验证码登录
	mobileSmsLogin: data => http.post('/member/auth/sms-login', data), 
	
	// 重置手机号密码
	resetMobilePassword: data => http.put('/member/user/reset-password', data), 
	
	// 手机号注册
	mobileRegister: data => http.post('/member/auth/sms/register', data),
	
	// 发送验证码
	sendSmsCode: data => http.post('/member/auth/send-sms-code', data), 
	
	// 邮箱注册
	emailRegister: data => http.post('/member/auth/email/register', data), 
	
	// 邮箱登录
	emailLogin: data => http.post('/member/auth/email/login', data), 
	
	// 重置邮箱密码 
	resetEmailPassword: data => http.put('/member/auth/email/reset-password', data),
	
	// 发送邮件
	sendEmailCode: data => http.post('/member/auth/email/send-sms-code', data),
	
	// 退出登录
	logout: () => http.post('/member/auth/logout'),
	
	// 微信授权登录登录
	wechatLogin: data => http.post('/member/auth/social-login', data), 
	
	// 绑定微信
	wechatBindAccout: data => http.post('/member/social-user/bind', data), 
}

export default loginApi